package com.ruoyi.hospital.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.hospital.domain.YlPackageType;
import com.ruoyi.hospital.mapper.YlPackageTypeMapper;
import com.ruoyi.hospital.service.IYlPackageTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 套餐类型信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-02-16
 */
@Service
public class YlPackageTypeServiceImpl implements IYlPackageTypeService
{
    @Autowired
    private YlPackageTypeMapper ylPackageTypeMapper;

    /**
     * 查询套餐类型信息
     * 
     * @param packageTypeId 套餐类型信息主键
     * @return 套餐类型信息
     */
    @Override
    public YlPackageType selectYlPackageTypeByPackageTypeId(Long packageTypeId)
    {
        return ylPackageTypeMapper.selectYlPackageTypeByPackageTypeId(packageTypeId);
    }

    /**
     * 查询套餐类型信息列表
     * 
     * @param ylPackageType 套餐类型信息
     * @return 套餐类型信息
     */
    @Override
    public List<YlPackageType> selectYlPackageTypeList(YlPackageType ylPackageType)
    {
        return ylPackageTypeMapper.selectYlPackageTypeList(ylPackageType);
    }

    /**
     * 新增套餐类型信息
     * 
     * @param ylPackageType 套餐类型信息
     * @return 结果
     */
    @Override
    public int insertYlPackageType(YlPackageType ylPackageType)
    {
        ylPackageType.setCreateTime(DateUtils.getNowDate());
        return ylPackageTypeMapper.insertYlPackageType(ylPackageType);
    }

    /**
     * 修改套餐类型信息
     * 
     * @param ylPackageType 套餐类型信息
     * @return 结果
     */
    @Override
    public int updateYlPackageType(YlPackageType ylPackageType)
    {
        ylPackageType.setUpdateTime(DateUtils.getNowDate());
        return ylPackageTypeMapper.updateYlPackageType(ylPackageType);
    }

    /**
     * 批量删除套餐类型信息
     * 
     * @param packageTypeIds 需要删除的套餐类型信息主键
     * @return 结果
     */
    @Override
    public int deleteYlPackageTypeByPackageTypeIds(Long[] packageTypeIds)
    {
        return ylPackageTypeMapper.deleteYlPackageTypeByPackageTypeIds(packageTypeIds);
    }

    /**
     * 删除套餐类型信息信息
     * 
     * @param packageTypeId 套餐类型信息主键
     * @return 结果
     */
    @Override
    public int deleteYlPackageTypeByPackageTypeId(Long packageTypeId)
    {
        return ylPackageTypeMapper.deleteYlPackageTypeByPackageTypeId(packageTypeId);
    }
}
